import { Routes, Route } from "react-router-dom";
import Home from "@/pages/Home";
import Resume from "@/pages/Resume";
import { useState, useRef } from "react";
import Background from "@/components/Background";

export default function App() {
  const [currentPage, setCurrentPage] = useState("landing");
  const backgroundRef = useRef<HTMLDivElement>(null);

  const goToResume = () => {
    setCurrentPage("resume");
  };

  const goToLanding = () => {
    setCurrentPage("landing");
  };

  return (
    <div className="min-h-screen relative overflow-hidden">
      <Background ref={backgroundRef} />
      <Routes>
        <Route 
          path="/" 
           element={<Home onEnterResume={goToResume} />} 
         />
         <Route 
           path="/resume" 
           element={<Resume onBackToLanding={goToLanding} />}
        />
      </Routes>
    </div>
  );
}
